| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | Static Public Member Functions | List of all members
nkAstraeus::ScriptsEngine Class Referencefinal

Drives the scripting sub engine. More...

## Public Member Functions
| ScriptsEngine (System *system=nullptr) noexcept
| ~ScriptsEngine ()
nkScripts::Environment * | getEnvironment () const
bool | initialize ()
void | shutdown ()

## Static Public Member Functions
static void | setupScriptsEnvironment (nkScripts::Environment *environment, LogManager *targetLogManager)

## Detailed Description

Drives the scripting sub engine.

The scripting engine wraps a big part of the C++ API, enabling dynamic programming in a live environment.

## Constructor & Destructor Documentation

## ◆ ScriptsEngine()

nkAstraeus::ScriptsEngine::ScriptsEngine | ( | System * | system = `nullptr` | ) |
| noexcept

Constructor.

Parameters

  system | The system the resource should live in. This will allow to select the LogManager to log to. If left to nullptr, no logging will happen in wrapped functions.

## ◆ ~ScriptsEngine()

nkAstraeus::ScriptsEngine::~ScriptsEngine | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ getEnvironment()

nkScripts::Environment* nkAstraeus::ScriptsEngine::getEnvironment | ( |  | ) | const

Returns
  The scripting environment initialized by the sub component.

## ◆ initialize()

bool nkAstraeus::ScriptsEngine::initialize | ( |  | ) |

Initializes the scripting sub component. Under the hood, this will create a nkScripts::Environment and populate it with all functions necessary to use the API.

Returns
  Whether the initialization went well (true) or not (false).

## ◆ shutdown()

void nkAstraeus::ScriptsEngine::shutdown | ( |  | ) |

Shuts down the sub component. This will free the scriptin environment and free its memory.

## ◆ setupScriptsEnvironment()

static void nkAstraeus::ScriptsEngine::setupScriptsEnvironment | ( | nkScripts::Environment * | environment,
|  | LogManager * | targetLogManager
| ) |  |
| static

Setups a given scripting environment with the nkEngine API that has been wrapped so far. For more information, please check the wrapping structures such as LogWrapper.

Parameters

  environment | The environment to augment with the engine's API.
  targetLogManager | The target log manager, should logging happen within the populated methods.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsAstraeus/Scripts/ScriptsEngine.h